- PR#4710, PR#4720: ocamlbuild does not use properly configuration information
- PR#4750: under some Windows installations, high start-up times for Unix lib
- PR#4777: problem with scanf and CRLF
+- PR#4783: ocamlmklib problem under Windows
- PR#4810: BSD problem with socket addresses, e.g. in Unix.getnameinfo
- PR#4813: issue with parsing of float literals by the GNU assembler
- PR#4816: problem with modules and private types
- PR#4922: ocamlbuild recompiles too many files
- PR#4923: missing \xff for scanf %S
- PR#4933: functors not handling private types correctly
+- PR#4940: problem with end-of-line in DOS text mode, tentative fix
+- PR#4953: problem compiling bytecode interpreter on ARM in Thumb mode.
+- PR#4955: compiler crash when typing recursive type expression with constraint
- Module Printf: the simple conversion %F (without width indication) was not
treated properly.
- Makefile: problem with cygwin, flexdll, and symbolic links
+- Various build problems with ocamlbuild under Windows with msvc
Feature wishes:
- PR#9: (tentative implementation) make ocamldebug use #linenum annotations
* First public release.
-$Id: Changes 9482 2009-12-22 13:32:12Z doligez $
+$Id: Changes 9536 2010-01-20 11:44:20Z doligez $
The native-code compiler (ocamlopt) requires Visual C++ (items [1], [2]),
the Microsoft assembler MASM (item [3]) and the flexdll tool (item [5]).
-The LablTk GUI requires Tcl/Tk 8.4 (item [4]).
+The LablTk GUI requires Tcl/Tk 8.5 (item [4]).
INSTALLATION:
Just run it and it should install OCaml automatically.
To run programs that use the LablTK GUI, the directory where the
-DLLs tk84.dll and tcl84.dll were installed (by the Tcl/Tk
+DLLs tk85.dll and tcl85.dll were installed (by the Tcl/Tk
installer) must be added to the PATH environment variable.
To compile programs that use the LablTK GUI, the directory where the
-libraries tk84.lib and tcl84.lib were installed (by the Tcl/Tk
+libraries tk85.lib and tcl85.lib were installed (by the Tcl/Tk
installer) must be added to the library search path in the LIB
environment variable. E.g. if Tcl/Tk was installed in C:\tcl, add
"C:\tcl\lib" to the LIB environment variable.
THIRD-PARTY SOFTWARE:
-[1] Visual C++ version 2005, 2003, or 6.
- We use Visual C++ 2005 Express Edition, which can be downloaded for free
+[1] Visual C++ version 2008, 2005, 2003, or 6.
+ We use Visual C++ 2008 Express Edition, which can be downloaded for free
from http://www.microsoft.com.
-[2] Windows header files and development libraries. We found them in
- the Microsoft Windows Server 2003 SP1 Platform SDK, which can
- be downloaded for free from http://www.microsoft.com/.
+[2] Windows header files and development libraries. They are included
+ in the Visual C++ 2008 Express Edition distribution.
+ Otherwise, you can find them in the Windows Platform SDK,
+ which can be downloaded for free from http://www.microsoft.com/.
[3] MASM version 6.11 or later. The full distribution of Visual C++ 2005
- contains MASM version 8. Users of the Express Edition of Visual C++
+ or 2008 contains MASM version 8. Users of the Express Edition of Visual C++
2005 can download MASM version 8 from
http://www.microsoft.com/downloads/details.aspx?FamilyID=7A1C9DA0-0510-44A2-B042-7EF370530C64&displaylang=en
To obtain MASM version 6.11, see
http://users.easystreet.com/jkirwan/new/pctools.html.
-[4] TCL/TK version 8.4. Windows binaries are available as part of the
+[4] TCL/TK version 8.5. Windows binaries are available as part of the
ActiveTCL distribution at http://www.activestate.com/products/ActiveTcl/
[5] flexdll.
these are not compatible with this Caml port (@responsefile not
recognized on the command line).
-The LablTk GUI requires Tcl/Tk 8.4. Windows binaries are available
+The LablTk GUI requires Tcl/Tk 8.5. Windows binaries are available
as part of the ActiveTCL distribution at
http://www.activestate.com/products/ActiveTcl/
Just run it and it should install OCaml automatically.
To run programs that use the LablTK GUI, the directory where the
-DLLs tk84.dll and tcl84.dll were installed (by the Tcl/Tk
+DLLs tk85.dll and tcl85.dll were installed (by the Tcl/Tk
installer) must be added to the PATH environment variable.
To compile programs that use the LablTK GUI, the directory where the
-libraries tk84.lib and tcl84.lib were installed (by the Tcl/Tk
+libraries tk85.lib and tcl85.lib were installed (by the Tcl/Tk
installer) must be added to the library search path in the LIB
environment variable. E.g. if Tcl/Tk was installed in C:\tcl, add
"C:\tcl\lib" to the LIB environment variable.
- Cygwin: http://sourceware.cygnus.com/cygwin/
Install at least the following packages: binutils, diffutils,
gcc-core, gcc-mingw-core, make, mingw-runtime, ncurses, w32-api.
-- TCL/TK version 8.4 (see above).
+- TCL/TK version 8.5 (see above).
- The flexdll tool (see above).
Do *not* install the standalone distribution of MinGW, nor the
-3.11.2+rc1
+3.11.2
# The version string is the first line of this file.
# It must be in the format described in stdlib/sys.mli
-# $Id: VERSION 9500 2009-12-28 13:13:23Z doligez $
+# $Id: VERSION 9537 2010-01-20 12:19:26Z doligez $
#!/bin/sh
-# $Id: boot-c-parts-windows.sh 8416 2007-10-08 14:19:34Z doligez $
+# $Id: boot-c-parts-windows.sh 9527 2010-01-14 14:45:42Z xclerc $
cd `dirname $0`/..
set -ex
mkdir -p _build/boot
cp -f byterun/ocamlrun.exe \
byterun/libcamlrun.$A \
- byterun/ocamlrun.dll \
asmrun/libasmrun.$A \
yacc/ocamlyacc.exe \
boot/ocamlc \
boot/ocamldep \
_build/boot
mkdir -p _build/byterun
-cp -f byterun/ocamlrun.exe byterun/ocamlrun.dll boot
-cp -f byterun/ocamlrun.$A _build/byterun
+cp -f byterun/ocamlrun.exe boot
# #
#########################################################################
-# $Id: install.sh 9289 2009-06-04 11:32:46Z doligez $
+# $Id: install.sh 9530 2010-01-15 13:33:23Z xclerc $
set -e
WIN32=""
if [ "x$EXE" = "x.exe" ]; then
installbin win32caml/ocamlwin.exe $PREFIX/OCamlWin.exe
- installdir byterun/ocamlrun.dll $BINDIR
WIN32=win32
fi
otherlibs/bigarray/bigarray.h \
$LIBDIR/caml
-installdir yacc/ocamlyacc byterun/ocamlrun $BINDIR
+installdir yacc/ocamlyacc$EXE byterun/ocamlrun$EXE $BINDIR
installdir config/Makefile $LIBDIR/Makefile.config
installdir byterun/ld.conf $LIBDIR
# #
#########################################################################
-# $Id: mkmyocamlbuild_config.sh 8768 2008-01-11 16:13:18Z doligez $
+# $Id: mkmyocamlbuild_config.sh 9520 2010-01-11 14:34:40Z doligez $
cd `dirname $0`/..
sed \
-e 's/^.*FLEXDIR.*$//g' \
-e 's/^#ml \(.*\)/\1/' \
+ -e 's/^\([^"][^"]*\("[^"]*"[^"]*\)*\)#.*$/\1/' \
-e 's/^\(#.*\)$/(* \1 *)/' \
-e 's/^\(.*\$([0-9]).*\)$/(* \1 *)/' \
-e 's/^\([^(=]*\)=\([^"]*\)$/let <:lower<\1>> = "\2";;/' \
(* *)
(***********************************************************************)
-(* $Id: bytelink.ml 9500 2009-12-28 13:13:23Z doligez $ *)
+(* $Id: bytelink.ml 9496 2009-12-28 13:05:36Z doligez $ *)
(* Link a set of .cmo files and produce a bytecode executable. *)
/* */
/***********************************************************************/
-/* $Id: interp.c 9279 2009-05-25 08:03:14Z xleroy $ */
+/* $Id: interp.c 9513 2010-01-08 10:33:23Z xleroy $ */
/* The bytecode interpreter */
#include <stdio.h>
#define SP_REG asm("a4")
#define ACCU_REG asm("d7")
#endif
-#ifdef __arm__
+/* PR#4953: these specific registers not available in Thumb mode */
+#if defined (__arm__) && !defined(__thumb__)
#define PC_REG asm("r9")
#define SP_REG asm("r8")
#define ACCU_REG asm("r7")
# #
#########################################################################
-# $Id: Makefile.mingw 9124 2008-11-09 09:44:24Z xleroy $
+# $Id: Makefile.mingw 9508 2010-01-04 15:52:44Z xleroy $
# Configuration for Windows, Mingw compiler
BNG_ASM_LEVEL=1
### Configuration for LablTk
-# Set TK_ROOT to the directory where you installed TCL/TK 8.4
+# Set TK_ROOT to the directory where you installed TCL/TK 8.5
# There must be no spaces or special characters in $(TK_ROOT)
TK_ROOT=c:/tcl
TK_DEFS=-I$(TK_ROOT)/include
-TK_LINK=$(TK_ROOT)/bin/tk84.dll $(TK_ROOT)/bin/tcl84.dll -lws2_32
+TK_LINK=$(TK_ROOT)/bin/tk85.dll $(TK_ROOT)/bin/tcl85.dll -lws2_32
############# Aliases for common commands
# #
#########################################################################
-# $Id: Makefile.msvc 9126 2008-11-10 15:24:51Z xleroy $
+# $Id: Makefile.msvc 9526 2010-01-14 14:42:00Z xclerc $
# Configuration for Windows, Visual C++ compiler
BYTECCCOMPOPTS=/Ox /MD
### Additional link-time options for $(BYTECC). (For static linking.)
-BYTECCLINKOPTS=/MD /F16777216
+BYTECCLINKOPTS=
### Additional compile-time options for $(BYTECC). (For building a DLL.)
DLLCCCOMPOPTS=/Ox /MD
NATIVECCCOMPOPTS=/Ox /MD
### Additional link-time options for $(NATIVECC)
-NATIVECCLINKOPTS=/MD /F16777216
+NATIVECCLINKOPTS=
### Build partially-linked object file
PACKLD=link /lib /nologo /out:# there must be no space after this '/out:'
BNG_ASM_LEVEL=0
### Configuration for LablTk
-# Set TK_ROOT to the directory where you installed TCL/TK 8.3
+# Set TK_ROOT to the directory where you installed TCL/TK 8.5
TK_ROOT=c:/tcl
TK_DEFS=-I$(TK_ROOT)/include
# The following definition avoids hard-wiring $(TK_ROOT) in the libraries
# produced by OCaml, and is therefore required for binary distribution
# of these libraries. However, $(TK_ROOT)/lib must be added to the LIB
# environment variable, as described in README.win32.
-TK_LINK=tk84.lib tcl84.lib ws2_32.lib
+TK_LINK=tk85.lib tcl85.lib ws2_32.lib
# An alternative definition that avoids mucking with the LIB variable,
# but hard-wires the Tcl/Tk location in the binaries
-# TK_LINK=$(TK_ROOT)/tk84.lib $(TK_ROOT)/tcl84.lib ws2_32.lib
+# TK_LINK=$(TK_ROOT)/tk85.lib $(TK_ROOT)/tcl85.lib ws2_32.lib
############# Aliases for common commands
# #
#########################################################################
-# $Id: Makefile.msvc64 8955 2008-07-29 08:31:41Z xleroy $
+# $Id: Makefile.msvc64 9526 2010-01-14 14:42:00Z xclerc $
# Configuration for Windows, Visual C++ compiler
BYTECCDBGCOMPOPTS=-DDEBUG /Zi /W3 /Wp64
### Additional link-time options for $(BYTECC). (For static linking.)
-BYTECCLINKOPTS=/MD /F33554432
+BYTECCLINKOPTS=
### Additional compile-time options for $(BYTECC). (For building a DLL.)
DLLCCCOMPOPTS=/Ox /MD
NATIVECCCOMPOPTS=/Ox /MD
### Additional link-time options for $(NATIVECC)
-NATIVECCLINKOPTS=/MD /F33554432
+NATIVECCLINKOPTS=
### Build partially-linked object file
PACKLD=link /lib /nologo /machine:AMD64 /out:# there must be no space after this '/out:'
parser_aux.cmi: primitives.cmi ../parsing/longident.cmi
pattern_matching.cmi: ../typing/typedtree.cmi parser_aux.cmi debugcom.cmi
pos.cmi: ../bytecomp/instruct.cmi
-primitives.cmi: ../otherlibs/unix/unix.cmi
+primitives.cmi: $(UNIXDIR)/unix.cmi
printval.cmi: ../typing/types.cmi ../typing/path.cmi parser_aux.cmi \
../typing/env.cmi debugcom.cmi
program_loading.cmi: primitives.cmi
symbols.cmi: ../bytecomp/instruct.cmi
time_travel.cmi: primitives.cmi
trap_barrier.cmi:
-unix_tools.cmi: ../otherlibs/unix/unix.cmi
+unix_tools.cmi: $(UNIXDIR)/unix.cmi
breakpoints.cmo: symbols.cmi primitives.cmi pos.cmi ../bytecomp/instruct.cmi \
exec.cmi debugcom.cmi checkpoints.cmi breakpoints.cmi
breakpoints.cmx: symbols.cmx primitives.cmx pos.cmx ../bytecomp/instruct.cmx \
exec.cmx debugcom.cmx checkpoints.cmx breakpoints.cmi
checkpoints.cmo: primitives.cmi int64ops.cmi debugcom.cmi checkpoints.cmi
checkpoints.cmx: primitives.cmx int64ops.cmx debugcom.cmx checkpoints.cmi
-command_line.cmo: unix_tools.cmi ../otherlibs/unix/unix.cmi \
+command_line.cmo: unix_tools.cmi $(UNIXDIR)/unix.cmi \
../typing/types.cmi time_travel.cmi symbols.cmi source.cmi \
show_source.cmi show_information.cmi question.cmi program_management.cmi \
program_loading.cmi printval.cmi primitives.cmi pos.cmi parser_aux.cmi \
events.cmi eval.cmi envaux.cmi debugger_config.cmi debugcom.cmi \
../typing/ctype.cmi ../utils/config.cmi checkpoints.cmi breakpoints.cmi \
command_line.cmi
-command_line.cmx: unix_tools.cmx ../otherlibs/unix/unix.cmx \
+command_line.cmx: unix_tools.cmx $(UNIXDIR)/unix.cmx \
../typing/types.cmx time_travel.cmx symbols.cmx source.cmx \
show_source.cmx show_information.cmx question.cmx program_management.cmx \
program_loading.cmx printval.cmx primitives.cmx pos.cmx parser_aux.cmi \
history.cmi
history.cmx: primitives.cmx int64ops.cmx debugger_config.cmx checkpoints.cmx \
history.cmi
-input_handling.cmo: ../otherlibs/unix/unix.cmi primitives.cmi \
+input_handling.cmo: $(UNIXDIR)/unix.cmi primitives.cmi \
input_handling.cmi
-input_handling.cmx: ../otherlibs/unix/unix.cmx primitives.cmx \
+input_handling.cmx: $(UNIXDIR)/unix.cmx primitives.cmx \
input_handling.cmi
int64ops.cmo: int64ops.cmi
int64ops.cmx: int64ops.cmi
../typing/printtyp.cmx ../typing/path.cmx ../utils/misc.cmx \
../parsing/longident.cmx ../typing/ident.cmx ../typing/env.cmx \
dynlink.cmx ../typing/ctype.cmx ../utils/config.cmx loadprinter.cmi
-main.cmo: unix_tools.cmi ../otherlibs/unix/unix.cmi time_travel.cmi \
+main.cmo: unix_tools.cmi $(UNIXDIR)/unix.cmi time_travel.cmi \
show_information.cmi question.cmi program_management.cmi primitives.cmi \
parameters.cmi ../utils/misc.cmi input_handling.cmi frames.cmi exec.cmi \
../typing/env.cmi debugger_config.cmi ../utils/config.cmi \
command_line.cmi ../utils/clflags.cmi checkpoints.cmi
-main.cmx: unix_tools.cmx ../otherlibs/unix/unix.cmx time_travel.cmx \
+main.cmx: unix_tools.cmx $(UNIXDIR)/unix.cmx time_travel.cmx \
show_information.cmx question.cmx program_management.cmx primitives.cmx \
parameters.cmx ../utils/misc.cmx input_handling.cmx frames.cmx exec.cmx \
../typing/env.cmx debugger_config.cmx ../utils/config.cmx \
../bytecomp/instruct.cmi pos.cmi
pos.cmx: source.cmx primitives.cmx ../parsing/location.cmx \
../bytecomp/instruct.cmx pos.cmi
-primitives.cmo: ../otherlibs/unix/unix.cmi primitives.cmi
-primitives.cmx: ../otherlibs/unix/unix.cmx primitives.cmi
+primitives.cmo: $(UNIXDIR)/unix.cmi primitives.cmi
+primitives.cmx: $(UNIXDIR)/unix.cmx primitives.cmi
printval.cmo: ../typing/types.cmi ../bytecomp/symtable.cmi \
../typing/printtyp.cmi ../typing/path.cmi parser_aux.cmi \
../typing/outcometree.cmi ../typing/oprint.cmi \
../typing/printtyp.cmx ../typing/path.cmx parser_aux.cmi \
../typing/outcometree.cmi ../typing/oprint.cmx \
../toplevel/genprintval.cmx debugcom.cmx printval.cmi
-program_loading.cmo: unix_tools.cmi ../otherlibs/unix/unix.cmi primitives.cmi \
+program_loading.cmo: unix_tools.cmi $(UNIXDIR)/unix.cmi primitives.cmi \
parameters.cmi input_handling.cmi debugger_config.cmi program_loading.cmi
-program_loading.cmx: unix_tools.cmx ../otherlibs/unix/unix.cmx primitives.cmx \
+program_loading.cmx: unix_tools.cmx $(UNIXDIR)/unix.cmx primitives.cmx \
parameters.cmx input_handling.cmx debugger_config.cmx program_loading.cmi
-program_management.cmo: unix_tools.cmi ../otherlibs/unix/unix.cmi \
+program_management.cmo: unix_tools.cmi $(UNIXDIR)/unix.cmi \
time_travel.cmi symbols.cmi question.cmi program_loading.cmi \
primitives.cmi parameters.cmi int64ops.cmi input_handling.cmi history.cmi \
debugger_config.cmi breakpoints.cmi program_management.cmi
-program_management.cmx: unix_tools.cmx ../otherlibs/unix/unix.cmx \
+program_management.cmx: unix_tools.cmx $(UNIXDIR)/unix.cmx \
time_travel.cmx symbols.cmx question.cmx program_loading.cmx \
primitives.cmx parameters.cmx int64ops.cmx input_handling.cmx history.cmx \
debugger_config.cmx breakpoints.cmx program_management.cmi
time_travel.cmi
trap_barrier.cmo: exec.cmi debugcom.cmi checkpoints.cmi trap_barrier.cmi
trap_barrier.cmx: exec.cmx debugcom.cmx checkpoints.cmx trap_barrier.cmi
-unix_tools.cmo: ../otherlibs/unix/unix.cmi primitives.cmi ../utils/misc.cmi \
+unix_tools.cmo: $(UNIXDIR)/unix.cmi primitives.cmi ../utils/misc.cmi \
unix_tools.cmi
-unix_tools.cmx: ../otherlibs/unix/unix.cmx primitives.cmx ../utils/misc.cmx \
+unix_tools.cmx: $(UNIXDIR)/unix.cmx primitives.cmx ../utils/misc.cmx \
unix_tools.cmi
# #
#########################################################################
-# $Id: Makefile.shared 9300 2009-06-18 11:17:16Z xclerc $
+# $Id: Makefile.shared 9529 2010-01-15 09:20:00Z doligez $
include ../config/Makefile
$(CAMLC) -c $(COMPFLAGS) $<
depend: beforedepend
- $(CAMLDEP) $(DEPFLAGS) *.mli *.ml > .depend
+ $(CAMLDEP) $(DEPFLAGS) *.mli *.ml \
+ | sed -e 's,$(UNIXDIR)/,$$(UNIXDIR)/,' > .depend
lexer.ml: lexer.mll
$(CAMLLEX) lexer.mll
# #
#########################################################################
-# $Id: Makefile.nt 5372 2003-01-06 14:57:22Z xleroy $
+# $Id: Makefile.nt 9528 2010-01-14 21:26:13Z doligez $
# The lexer generator
+include ../config/Makefile
+
CAMLC=../boot/ocamlrun ../boot/ocamlc -I ../boot
CAMLOPT=../boot/ocamlrun ../ocamlopt -I ../stdlib
COMPFLAGS=-warn-error A
(* *)
(***********************************************************************)
-(* $Id: myocamlbuild.ml 9290 2009-06-04 11:33:21Z doligez $ *)
+(* $Id: myocamlbuild.ml 9531 2010-01-15 13:36:23Z xclerc $ *)
open Ocamlbuild_plugin
open Command
Seq[Cmd(S[A"mkdir"; A"-p"; P"ocamldoc/stdlib_man"]);
Cmd(S[ocamldoc; A"-man"; A"-d"; P"ocamldoc/stdlib_man";
A"-I"; P "stdlib"; A"-I"; P"otherlibs/unix"; A"-I"; P"otherlibs/num";
- A"-t"; A"Ocaml library"; A"-man-mini"; atomize stdlib_mlis])]
+ A"-t"; A"OCaml library"; A"-man-mini"; atomize stdlib_mlis])]
end;;
flag ["ocaml"; "compile"; "bootstrap_thread"]
rule "ocaml C stubs on windows: dlib & d.o* -> dll"
~prod:"%.dll"
- ~deps:["%.dlib"(*; "byterun/ocamlrun"-.-C.a*)]
+ ~deps:["%.dlib"(*; "byterun/libcamlrun"-.-C.a*)]
~insert:`top
begin fun env build ->
let dlib = env "%.dlib" in
| Outcome.Good d_o -> d_o
| Outcome.Bad exn -> raise exn
end resluts in
- mkdll dll (S[atomize objs; P("byterun/ocamlrun"-.-C.a)])
+ mkdll dll (S[atomize objs; P("byterun/libcamlrun"-.-C.a)])
(T(tags_of_pathname dll++"dll"++"link"++"c"))
end;;
../../byterun/misc.h
condition.cmi: mutex.cmi
event.cmi:
+marshal.cmi:
mutex.cmi:
-thread.cmi: unix.cmo
-threadUnix.cmi: unix.cmo
+pervasives.cmi:
+thread.cmi: unix.cmi
+threadUnix.cmi: unix.cmi
+unix.cmi:
condition.cmo: thread.cmi mutex.cmi condition.cmi
condition.cmx: thread.cmx mutex.cmx condition.cmi
event.cmo: mutex.cmi condition.cmi event.cmi
event.cmx: mutex.cmx condition.cmx event.cmi
-marshal.cmo: pervasives.cmo
-marshal.cmx: pervasives.cmx
+marshal.cmo: pervasives.cmi marshal.cmi
+marshal.cmx: pervasives.cmx marshal.cmi
mutex.cmo: thread.cmi mutex.cmi
mutex.cmx: thread.cmx mutex.cmi
-pervasives.cmo: unix.cmo
-pervasives.cmx: unix.cmx
-thread.cmo: unix.cmo thread.cmi
+pervasives.cmo: unix.cmi pervasives.cmi
+pervasives.cmx: unix.cmx pervasives.cmi
+thread.cmo: unix.cmi thread.cmi
thread.cmx: unix.cmx thread.cmi
-threadUnix.cmo: unix.cmo thread.cmi threadUnix.cmi
+threadUnix.cmo: unix.cmi thread.cmi threadUnix.cmi
threadUnix.cmx: unix.cmx thread.cmx threadUnix.cmi
-unix.cmo:
-unix.cmx:
+unix.cmo: unix.cmi
+unix.cmx: unix.cmi
dumpapprox
objinfo
cvt_emit
+cvt_emit.bak
cvt_emit.ml
ocamlcp
ocamlmktop
(* *)
(***********************************************************************)
-(* $Id: ocamlmklib.mlp 9365 2009-10-02 12:32:45Z doligez $ *)
+(* $Id: ocamlmklib.mlp 9507 2010-01-04 15:50:25Z xleroy $ *)
open Printf
open Myocamlbuild_config
+(* PR#4783: under Windows, don't use absolute paths because we do
+ not know where the binary distribution will be installed. *)
+let compiler_path name =
+ if Sys.os_type = "Win32" then name else Filename.concat bindir name
+
let bytecode_objs = ref [] (* .cmo,.cma,.ml,.mli files to pass to ocamlc *)
and native_objs = ref [] (* .cmx,.cmxa,.ml,.mli files to pass to ocamlopt *)
and c_objs = ref [] (* .o, .a, .obj, .lib, .dll files to pass to mksharedlib and ar *)
and c_libs = ref [] (* libs to pass to mksharedlib and ocamlc -cclib *)
and c_opts = ref [] (* options to pass to mksharedlib and ocamlc -ccopt *)
and ld_opts = ref [] (* options to pass only to the linker *)
-and ocamlc = ref (Filename.concat bindir "ocamlc")
-and ocamlopt = ref (Filename.concat bindir "ocamlopt")
+and ocamlc = ref (compiler_path "ocamlc")
+and ocamlopt = ref (compiler_path "ocamlopt")
and output = ref "a" (* Output name for Caml part of library *)
and output_c = ref "" (* Output name for C part of library *)
and rpath = ref [] (* rpath options *)
(* *)
(***********************************************************************)
-(* $Id: typedecl.ml 9292 2009-06-08 04:08:14Z garrigue $ *)
+(* $Id: typedecl.ml 9509 2010-01-06 11:32:57Z garrigue $ *)
(**** Typing of type definitions ****)
None -> None
| Some sty ->
let no_row = not (is_fixed_type sdecl) in
- let ty =
- transl_simple_type env no_row sty in
- if Ctype.cyclic_abbrev env id ty then
- raise(Error(sdecl.ptype_loc, Recursive_abbrev name));
- Some ty
+ Some (transl_simple_type env no_row sty)
end;
type_variance = List.map (fun _ -> true, true, true) params;
} in
raise(Error(loc, Unconsistent_constraint tr)))
cstrs;
Ctype.end_def ();
+ (* Add abstract row *)
if is_fixed_type sdecl then begin
let (p, _) =
try Env.lookup_type (Longident.Lident(Ident.name id ^ "#row")) env
with Not_found -> assert false in
set_fixed_row env sdecl.ptype_loc p decl
end;
+ (* Check for cyclic abbreviations *)
+ begin match decl.type_manifest with None -> ()
+ | Some ty ->
+ if Ctype.cyclic_abbrev env id ty then
+ raise(Error(sdecl.ptype_loc, Recursive_abbrev name));
+ end;
(id, decl)
(* Generalize a type declaration *)